|
Update License |
|
Code Samples
When processsing requests (sign the XML document, verify the signature in the XML document,...), the , the proXSign® component checks the license file, that should be located in the user's Roaming profile (\AppData\Roaming\SETCCE\proXSign\Licenses). If the license file is found and allows requested operation (domain name + OS + browser + functionality), then the proXSign® component will run in production mode, otherwise in the trial mode.
After initializing the component, Use the method updateLicense() to force the update of the license file from the SETCCE server.
The method updateLicense() takes two parameters:
·URL - location of the license file on the SETCCE server
·forceUpdate – when set to 0, the component will not download the license file from the license file URL, but will search only on the local computer (ensure it is present there); value 1 will force the download of the license file from the URL
|
<script> var callbackLicense = function (data, textStatus) {
var s; if (data.error == 1) { alert("OK");
} // ERROR else { var s = "Error code: " + data.error; //Error codes are described in xErrors.txt file s += "\r\nError message: " + data.errorMessage; alert(s); } }
var callbackError = function(jqXHR, textStatus, errorThrown){
var s = "Error : " + JSON.stringify(jqXHR); // General error in ajax call alert("Error: proXSign component is not responding"); alert(s); }
function updateLicense() {
var force = "false"; //force = "true"; //force = true; //Both values, force = "true"; or force = true; are valid var URLToFile= "http://www.setcce.si/proxsign/licenses/SETCCE8ZFg64.lic";
proXSign.updateLicense({fileURL : URLToFile, forceUpdate : force }, callbackLicense, callbackError); } </script> |
Result
The license file is downloaded to the the user's Roaming profile (\AppData\Roaming\SETCCE\proXSign\Licenses).